<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
    <jsp:include page="../common/common.jsp"/>
</head>
<body class="page-header-fixed">
<jsp:include page="../common/header.jsp"/>
<div class="clearfix">
</div>
<div class="page-container">
    <div class="page-sidebar-wrapper"><jsp:include page="../common/menu.jsp"/></div>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <form class="form-horizontal form-row-seperated" id="form" method="post" action="${path}/mcadvice/save">
                        <div class="portlet box purple">
                            <div class="portlet-title">
                                <div class="caption">
                                    <i class="fa fa-shopping-cart"></i>视频监控查看
                                </div>
                                <div class="actions btn-set">
                                    <a href="javascript:history.go(-1);" class="btn default"><i
                                            class="fa fa-angle-left"></i> 返回</a>
<!--                                     <button type="button" onclick="save()" class="btn blue"><i class="fa fa-check"></i> 保存 -->
<!--                                     </button> -->
                                </div>
                            </div>
                            <div class="portlet-body">
                                <div class="tabbable">
                                    <div class="tab-content no-space">
                                        <div class="tab-pane active" id="tab_general">
                                            <div class="form-body">
                                                
                                          <%--      <div class="form-group">
                                                    <label class="col-md-2 control-label">标题:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input type="text" id="title" name="title"
                                                               class="form-control measure-input" 
                                                               value="${data.title}"/>
                                                    </div>
                                                    <div class="col-md-5">
                                                        &nbsp;可输入<b><span id="title_len">80</span></b> 个字符
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">作者:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input type="text" id="author" name="author"
                                                               class="form-control measure-input"
                                                               value="${data.author}"/>
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">审核:
                                                        <span class="required">*</span>
                                                    </label>
                                                    <div class="col-md-3">
                                                        <select name="status" class="form-control">
                                                        	<option value="2" <c:if test="${2== data.status }">selected="selected" </c:if> >审核不通过</option>
                                                            <option value="1" <c:if test="${1== data.status }">selected="selected" </c:if> >审核通过</option>
                                                            <option value="0" <c:if test="${0== data.status }">selected="selected" </c:if> >未审核</option>
                                                        </select>
                                                    </div>
                                                </div>

												<div class="form-group">
                                                    <label class="col-md-2 control-label">发布时间:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input id="falseCreateTime" name="falseCreateTime" type="text"
                                                               class="form-control tags medium"
                                                               value="${data.falseCreateTime}"/>
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">内容:
                                                    </label>

                                                    <div class="col-md-5" >
                                                        <textarea id="context" name="context"
                                                               class="form-control tags medium" style="height: 200px ! important;width: 600px ! important;"
                                                               >${data.context}</textarea>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">回复:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input type="text" id="reply" name="reply"
                                                               class="form-control measure-input" 
                                                               value="${data.reply}"/>
                                                    </div>
                                                    <div class="col-md-5">
                                                        &nbsp;可输入<b><span id="title_len">80</span></b> 个字符
                                                    </div>
                                                </div>
                                                 --%>
            									<div id="a1"></div>
												<script type="text/javascript" src="${path}/operate/js/ckplayer.js" charset="utf-8"></script>
												<script type="text/javascript">
												if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace(/[ ]/g,"")=="MSIE6.0"
												||navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace(/[ ]/g,"")=="MSIE7.0"
												||navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion .split(";")[1].replace(/[ ]/g,"")=="MSIE8.0") 
												{
													var flashvars={
														//f:'http://58.51.95.213/111.flv',
														f:'http://img.ksbbs.com/asset/Mon_1605/0ec8cc80112a2d6.mp4',
														c:0,
														b:1,
														i:'http://www.ckplayer.com/static/images/cqdw.jpg'
														};
													var params={bgcolor:'#FFF',allowFullScreen:true,allowScriptAccess:'always',wmode:'transparent'};
													CKobject.embedSWF('ckplayer/ckplayer.swf','a1','ckplayer_a1','600','400',flashvars,params);	
												}
												else{
													var flashvars={
														p:0,
														e:1,
														i:'http://www.ckplayer.com/static/images/cqdw.jpg'
														};
													var video=['http://img.ksbbs.com/asset/Mon_1605/0ec8cc80112a2d6.mp4'];
													var support=['all'];
													CKobject.embedHTML5('a1','ckplayer_a1',600,400,video,flashvars,support);
												}
													
												</script>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="portlet-title">
                                <div class="actions btn-set">
                                    <a href="javascript:history.go(-1);" class="btn default"><i
                                            class="fa fa-angle-left"></i> 返回</a>
<!--                                     <button type="button" onclick="save()" class="btn blue"><i class="fa fa-check"></i> 保存 -->
<!--                                     </button> -->
                                </div>
                            </div>
                        </div>
                        <input type="hidden" id="id" name="id" value="${data.id}">
                        <input type="hidden" id="teams" name="teams" value="${data.teams}" />
                        <input type="hidden" id="username" name="username" value="${data.username}" />
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../common/footer.jsp"/>

<script>
    function save() {
    	  App.ajax(_path + "/mcadvice/saveAdvice", $("form").serialize(),
					function(data) {
						if (data.statusCode == 200) {
							App.bubble(200, "成功！");
							window.setTimeout(function() {
								window.close();//修改成功，弹出新页面，直接关闭
							}, 400);
						} else if (data.statusCode == 100) {
							App.bubble(100, "添加成功！");
							window.setTimeout(function() {
								history.go(-1);//返回上一级
							}, 400);
						} else {
							App.bubble(500, "信息失败！");
							// alert("信息失败")
						}
					});
    }
</script>
</body>
</html>